package cn.dgut.training.service;

import cn.dgut.training.dto.goods.CartUpdateDTO;
import cn.dgut.training.entity.goods.Cart;
import cn.dgut.training.dto.goods.CartDTO;
import cn.dgut.training.entity.goods.Goods;
import cn.dgut.training.entity.goods.GoodsProduct;
import cn.dgut.training.vo.goods.CartListVO;
import cn.dgut.training.dto.transaction.Checkout;
import cn.dgut.training.vo.CommonResponse;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.bind.annotation.RequestBody;

public interface ICartService extends IService<Cart> {

     CartListVO index(Long userID); //显示某一用户的购物车

     CommonResponse addGoods(CartDTO cartDTO);//添加商品进购物车

     CommonResponse fastAdd(CartDTO cartDTO);//立即购买

     Long checked(CartUpdateDTO cartUpdateDTO);//设置勾选

     CommonResponse updateGoods(CartDTO cartDTO);//修改购物车中商品数目

     Long deleteGoods(CartDTO cartDTO);//删除购物车中商品

     CommonResponse checkout(Long userId,Checkout checkout);//确认订单信息

     void updateByGoodsProduct(GoodsProduct goodsProduct,Goods goods);

}
